//
//  CheckNetTool.swift
//  DollarBuy
//
//  Created by 郑东喜 on 2016/11/7.
//  Copyright © 2016年 郑东喜. All rights reserved.
//

import UIKit

class CheckNetTool: NSObject {
    
    static let shareInstance = CheckNetTool()
    
    func checkNet() -> Void {
        AFNetworkReachabilityManager.shared().startMonitoring()
        AFNetworkReachabilityManager.shared().setReachabilityStatusChange { (status) in
            switch status {
            case .unknown: break
                //                JLToast.makeText("当前网络未知", duration: 3).show(UIApplication.sharedApplication().keyWindow)
                
            case .notReachable:
                MBManager.showBriefAlert(netWrong)
                break
            case .reachableViaWiFi:
                break
            case .reachableViaWWAN:
                break
                
            }
            
        }
        
    }
}


